package com.xbs.utils;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 * 查看配置信息
 */
import com.xbs.controller.base.BaseServlet;
import com.xbs.entity.CarModelEntity;
import com.xbs.service.content.OrderService;
@WebServlet("/ajaxorderfind")
public class AjaxOrderFindServlet extends BaseServlet {
	private OrderService os;
	private CarModelEntity car;
	public AjaxOrderFindServlet() {
		os = new OrderService();
		car = new CarModelEntity();
	}
	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		//接受用户要查看的车型的配置信息
		String order = req.getParameter("order");
		car=os.getCarModel(order);
		String str="<tr>"
				+ "<td>品牌:</td>"
				+ "<td>"+car.getCarmodeltype()+"</td>"
				+ "<td>车型:</td>"
				+ "<td>"+car.getCarmodelname()+"</td>"
				+ "</tr>"
				+ "<tr>"
				+ "<td>年代款:</td>"
				+ "<td>"+car.getCarmodelyear()+"</td>"
				+ "<td>燃料类型:</td>"
				+ "<td>"+car.getFueltype()+"</td>"
				+ "</tr>"
				+ "<tr>"
				+ "<td>座位数:</td>"
				+ "<td>"+car.getSeating()+"</td>"
				+ "<td>GPS导航:</td>"
				+ "<td>"+car.getCarmodelgps()+"</td>"
				+ "</tr>";	
		
		resp.getWriter().print(str);
	}
}
